@inherits RenderViewPage
@using System;
@using Umbraco.Cms.Web;
@using PBDesk.com.Extension.UmbHelper;
@using PBDesk.Utilities;
@{
    string bannerType = ViewData["BannerType"].ToString(); 
    string columns = ViewData["Columns"].ToString(); 
    string[] colArr = columns.Split(new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
    int columnCount = colArr.Length;
    string className = MyHelper.GetBannerColumnStyle(columnCount);
    string divId = bannerType + "banner";
} 
<div id="@divId">
@foreach(string banner in colArr)
{
    var node = @DynamicModel.Widgets.First("widgetName == @0", banner);
    if (node != null)
    { 
    <div class="@className">
        <h2>@Html.Raw(node.WidgetTitle)</h2>
        <div style="padding:10px 5px 5px 10px">@Html.Raw(node.WidgetContent)</div>
    </div>
    }
}
</div>

